<?php

/**
 * @author      Nguyen Duc Thuan <me@ndthuan.com>
 * @copyright   Copyright (c) 2009 Nguyen Duc Thuan <me@ndthuan.com>
 * @version     $Id: Route.php 12 2009-11-03 03:17:46Z thuan.nguyen $
 */

class Fete_Route
{
    protected $_condition   = null;
    protected $_params      = array(
        'action'        => 'index'
    );

    public function __construct($condition, $params = array())
    {
        $this->_condition   = $condition;
        $this->_params      = array_merge($this->_params, $params);
    }

    public function match($query)
    {
        if ($query === $this->_condition) {
            return true;
        }

        return false;
    }

    public function getParams()
    {
        return $this->_params;
    }

    public function getLink()
    {
        return $this->_condition;
    }
}